﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Robotics.Race
{
	public class NxtConfiguration
	{
		Bram.NxtSharp.NxtBrick brick = new Bram.NxtSharp.NxtBrick();
		public Bram.NxtSharp.NxtBrick Brick
		{
			get { return brick; }
		}

		Bram.NxtSharp.NxtMotor motorLeft = new Bram.NxtSharp.NxtMotor();
		public Bram.NxtSharp.NxtMotor MotorLeft
		{
			get { return motorLeft; }
		}

		Bram.NxtSharp.NxtMotor motorRight = new Bram.NxtSharp.NxtMotor();
		public Bram.NxtSharp.NxtMotor MotorRight
		{
			get { return motorRight; }
		}

        Bram.NxtSharp.NxtLightSensor lightSensorLeft = new Bram.NxtSharp.NxtLightSensor();
        public Bram.NxtSharp.NxtLightSensor LightSensorLeft
		{
			get { return lightSensorLeft; }
		}

        Bram.NxtSharp.NxtLightSensor lightSensorRight = new Bram.NxtSharp.NxtLightSensor();
        public Bram.NxtSharp.NxtLightSensor LightSensorRight
		{
			get { return lightSensorRight; }
		}

		Bram.NxtSharp.NxtPressureSensor pressureSensor = new Bram.NxtSharp.NxtPressureSensor();
		public Bram.NxtSharp.NxtPressureSensor PressureSensor
		{
			get { return pressureSensor; }
		}

        Bram.NxtSharp.NxtSonar sonar = new Bram.NxtSharp.NxtSonar();
        public Bram.NxtSharp.NxtSonar Sonar
        {
            get { return sonar; }
        }

		public NxtConfiguration()
		{
            pressureSensor.Brick = brick;
            pressureSensor.Port = Bram.NxtSharp.NxtSensorPort.Port2;
            lightSensorLeft.Brick = brick;
            lightSensorLeft.Port = Bram.NxtSharp.NxtSensorPort.Port4;
            lightSensorLeft.Active = true;
            lightSensorRight.Brick = brick;
            lightSensorRight.Port = Bram.NxtSharp.NxtSensorPort.Port1;
            lightSensorRight.Active = true;
            motorLeft.Brick = brick;
            motorLeft.Port = Bram.NxtSharp.NxtMotorPort.PortA;
            motorRight.Brick = brick;
            motorRight.Port = Bram.NxtSharp.NxtMotorPort.PortB;
            sonar.Brick = brick;
            sonar.Port = Bram.NxtSharp.NxtSensorPort.Port3;
            brick.COMPortName = "COM15";
        }
	}
}
